using System;
using System.Collections.Generic;
using rlTodayMakeSkin.Project.XmlElement;

namespace rlTodayMakeSkin.Project.Attributes
{
    /// <summary>
    /// contains information about rlTodayXmlElement members
    /// </summary>
    public class PropertyDescriptionAttribute : Attribute
    {
        private string descrizione;
        private PropertyTypes tipo = PropertyTypes.STRING;
        private SupportedVersion version = SupportedVersion.ALL;
        private bool blnRop = false; //true if the property is read only

        /******************
         CONSTRUCTORS
         *****************/
        public PropertyDescriptionAttribute(string description)
        {
            descrizione = description;
        }

        public PropertyDescriptionAttribute(string description, PropertyTypes t) : this(description)
        {
            tipo = t;
        }

        public PropertyDescriptionAttribute(string desc, PropertyTypes t, SupportedVersion version)
            : this(desc, t)
        {
            this.version = version;
        }

        /*********************
         PUBLIC MEMBERS
         ********************/

        /// <summary>
        /// Gets a description of property marked with this attribute
        /// </summary>
        public string Description
        {
            get { return descrizione; }
        }

        /// <summary>
        /// Gets the type of the property marked with this attribute
        /// </summary>
        /// <value>Default value: PropertyTypes.STRING</value>
        public PropertyTypes PropertyType
        {
            get { return tipo; }
        }

        /// <summary>
        /// Gets version of rlToday screen in which property is
        /// introduced
        /// </summary>
        /// <value>Defualt value SupportedVersion.ALL</value>
        public SupportedVersion Version{
            get { return version; }
        }

        /// <summary>
        /// Gets, sets a value that indicates if property is read only
        /// </summary>
        public bool ReadOnlyProperty
        {
            get { return blnRop; }
            set { blnRop = value;}
        }
    }

}
